package com.spms.service.Impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.spms.entity.Admin;
import com.spms.entity.Student;
import com.spms.entity.Teacher;
import com.spms.mapper.AdminMapper;
import com.spms.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService {
	
	@Autowired
	private AdminMapper adminmapper;
	
	
	@Override
	public int DeleteStudent(int s_id) {
		
		return adminmapper.DeleteStudent(s_id);
	}
	
	@Override
	public int DeleteTeacher(int t_id) {
		// TODO Auto-generated method stub
		return adminmapper.DeleteTeacher(t_id);
	}
	
	@Override
	public List<Student> queryAllStudent()//查看所有学生的信息
	{

		return adminmapper.queryAllStudent();
	}
	
	
	@Override
	public List<Teacher> queryAllTeacher()//查看所有老师的信息
	{
		return adminmapper.queryAllTeacher();
	}

	@Override
	public int adminRegister(Admin admin)//管理员注册
	{
		return adminmapper.adminRegister(admin);
	}
	
	@Override
	public Admin adminLogin(String user_name, String user_password)//管理员注册
	{
		return adminmapper.adminLogin(user_name,user_password);
	}
}
